<template>
	<view class="container">

		<view class="identity" @click="chooseImage" v-show="idCardInfo.length>0">
			<h1 class="htit">身份证>></h1>
			<view class="bcard" v-for="(item,index) in idCardInfo" :key="index">
				<div class="bcard-box">
					姓名:{{item.name}}
				</div>
				<div class="bcard-box">
					性别:{{item.sex}}
				</div>
				<div class="bcard-box">
					身份证号:{{item.num}}
				</div>
			</view>


			<!-- 其他信息展示 -->
		</view>
		<div v-show="!idCardInfo.length" class="identity">
			<h1 class="htit">身份证>></h1>
			<image @click="chooseImage" :src="imgL" mode="widthFix" style="width: 667rpx;height: 150px;">
			</image>
		</div>
		<view class="identity1" @click="chooseImage1" v-show="CardInfo.length>0">
			<h1 class="htit">银行卡>></h1>
			<view class="bcard1" v-for="(item,index) in CardInfo" :key="index">
				<div class="bcard-box">
					{{item.name}}
				</div>
				<div class="bcard-box">
					{{item.type}}
				</div>
				<div class="bcard-box">
					{{item.num}}
				</div>
			</view>
			<!-- 其他信息展示 -->
		</view>
		<div v-show="!CardInfo.length">
			<h1 class="htit">银行卡>></h1>
			<image @click="chooseImage1" :src="imgK" mode="widthFix" style="width: 667rpx;height: 150px;">
			</image>
		</div>

	</view>
</template>

<script>
	export default {
		data() {
			return {

				imgL: 'https://cdn.uviewui.com/uview/demo/upload/positive.png',
				imgK: 'https://img.zcool.cn/community/0178dc599f97fda80121ad7b49225d.png@1280w_1l_2o_100sh.png',
				idCardInfo: [],
				CardInfo: '',
			}
		},
		onLoad() {
			let res = JSON.parse(uni.getStorageSync('list'));
			let res1 = JSON.parse(uni.getStorageSync('lists'));
			this.idCardInfo = res;
			this.CardInfo = res1;

		},
		methods: {

			chooseImage() {
				uni.reLaunch({
					url: "/pages/Upsfyh/Upsfyh"
				})

			},
			chooseImage1() {
				uni.redirectTo({
					url: "/pages/UploadBcard/UploadBcard"
				});

			}



		}
	}
</script>

<style>
	.bcard {
		width: 667rpx;
		height: 300rpx;
		border: 1px solid #000;
		border-radius: 15px;
		padding-left: 20rpx;
		background-color: aquamarine;
		font-weight: 600;
		background-image: url('https://bpic.588ku.com/element_origin_min_pic/19/04/09/00ddce30488378d35da6f2c82520343e.jpg');
	}

	.bcard1 {
		width: 667rpx;
		height: 300rpx;
		border: 1px solid #000;
		border-radius: 15px;
		padding-left: 20rpx;
		color: aliceblue;
		font-weight: 600;
		background-image: url('https://ts1.cn.mm.bing.net/th/id/R-C.14f5a024c2df660c19b27351e7d753cd?rik=Y%2f3tWxEblCAA2A&riu=http%3a%2f%2fpic28.nipic.com%2f20130410%2f9252150_113028238000_2.jpg&ehk=yqqM6cR2e9a0z%2b6YFJJ3KKvPw2UYflg5QiixE0LnIrU%3d&risl=&pid=ImgRaw&r=0');
		margin-right: 100rpx;
	}

	.bcard-box {
		margin-top: 40rpx;
		font-size: 40rpx
	}



	/* 样式可以根据需要自定义 */
	.container {
		padding: 20px;
	}

	.identity {
		margin-bottom: 100rpx;

	}

	.identity1 {
		margin-bottom: 100rpx;

	}

	.htit {
		width: 160rpx;
		font-size: 35rpx;
		font-weight: 600;
		border-bottom: 15rpx solid skyblue;
		margin-bottom: 20rpx;

	}
</style>